package com.eshore.ezone.utils;

import android.content.Context;
import android.os.Build;
import android.telephony.TelephonyManager;

/**
 * The Class DeviceConfig to get info from device , sim card and so on.
 */
public class MobileConfigs {
    /**
     * Get the mobile imsi number.
     *
     * @param context the context
     * @return imsi number
     */
    public static String getImsi(final Context context) {
        final TelephonyManager telephonyManager = 
            (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        final String imei = telephonyManager.getSubscriberId();
        return imei == null ? "" : imei; // need to do null pointer check 
    }
    
    public static String getModel() {
        final String model = Build.MODEL;   
        return model == null ? "" : model;
    }

}
